package com.erp.mapper;

import com.erp.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Mapper
@Repository
public interface UserMapper {

    Map userLogin(User user);

    int updateStateLogout(String account);
    int updateStateLogin(String account);
    int findNameCountId(String name);
    String findAccountLimit();
    int addUser(User user);
    List<Map>findAllUsers(@Param("map") Map<String, Object>map);
    int countUsers(@Param("map")Map<String, Object>map);
    int removeUser(int id);
    int updateUser(User user);
    List<User>findOnlineUsers();
    int countOnlineUsers(@Param("map")Map<String, Object>map);
    List<Map>limitOnlineUsers(@Param("map")Map<String, Object>map);
    int logoutOnlineUser(Integer uId);

    List<User>findUserID();

}
